package com.crm.service.verifyPhone;

import com.crm.model.entity.verifyPhone.VerifyPhone;
import com.crm.model.qo.verifyPhone.VerifyPhoneQO;
import com.crm.model.qo.verifyPhone.VerifyPhoneReportQO;
import com.crm.model.vo.verifyPhone.VerifyPhoneReportVO;
import com.crm.model.vo.verifyPhone.VerifyPhoneVO;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author renshaorong
 * @Date 2021/07/07 2:05 下午
 */
@Service
public interface VerifyPhoneDbService {

    /**
     * 获取列表
     * @param verifyPhoneQO
     * @param toString
     * @return
     */
    List<VerifyPhoneVO> selectAllVerifyPhoneList(VerifyPhoneQO verifyPhoneQO, String toString);

    /**
     * 新增核实电话
     * @Author pym
     * @Date  2021/7/9 10:58
     * @param verifyPhone 核实电话
     * @return {@link {java.lang.Boolean}}
     */
    Boolean insertVerifyPhone(VerifyPhone verifyPhone);


    /**
     * 修改
     * @param verifyPhone
     * @return
     */
    boolean updateByPrimaryKeySelective(VerifyPhone verifyPhone);


    /**
     * 通过主键查找
     * @return
     */
    VerifyPhone selectVerifyPhoneById(String verifyPhoneId);

    /**
     * @Description: 电话核实报表
     * @Param: [reportQO]
     * @Return: java.util.List<com.crm.model.vo.verifyPhone.VerifyPhoneReportVO>
     * @Author: lixq-f
     * @Date: 2021/7/13
     **/
    List<VerifyPhoneReportVO> getLe30VerifyPhoneReport(VerifyPhoneReportQO reportQO);


    /**
     * @Description: 电话核实报表
     * @Param: [reportQO]
     * @Return: java.util.List<com.crm.model.vo.verifyPhone.VerifyPhoneReportVO>
     * @Author renshaorong
     * @Date 2021/8/3
     **/
    List<VerifyPhoneReportVO> getGe30Lt60VerifyPhoneReport(VerifyPhoneReportQO reportQO);

    /**
     * @Description: 电话核实报表
     * @Param: [reportQO]
     * @Return: java.util.List<com.crm.model.vo.verifyPhone.VerifyPhoneReportVO>
     * @Author: lixq-f
     * @Date: 2021/7/13
     **/
    List<VerifyPhoneReportVO> getGe60Lt90VerifyPhoneReport(VerifyPhoneReportQO reportQO);


    /**
     * @Description: 电话核实报表
     * @Param: [reportQO]
     * @Return: java.util.List<com.crm.model.vo.verifyPhone.VerifyPhoneReportVO>
     * @Author: lixq-f
     * @Date: 2021/7/13
     **/
    List<VerifyPhoneReportVO> getGe90VerifyPhoneReport(VerifyPhoneReportQO reportQO);

    /**
     * 核实电话 管理端表格数据，返回分公司下个人 <30 <60 <90 >90 总时长数据
     * @param dateUnit
     * @param companyId
     * @return
     */
    List<VerifyPhoneReportVO> getDurationByCompanyId(Integer dateUnit, String companyId);

    /**
     * 核实电话 超管端表格数据，返回各分公司下 <30 <60 <90 >90 总时长数据 平均数
     * @param dateUnit
     * @return
     */
    List<Map<String,Object>> getAllDurationGroupByCompanyId(Integer dateUnit);
}
